<template>
  <div class="ele-body">
    <header-card  ref="header" :whereParams="where"/>
    <CenterCard ref="centercard" :whereParams="where" />
    <BottomCard ref="bottomcard" :whereParams="where" />
  </div>
</template>

<script>
  import moment from "moment"
  import CenterCard from './components/centerCard.vue';
  import HeaderCard from './components/headerCard.vue';
  import BottomCard from './components/bottomCard.vue';

  export default {
    name: 'home',
    components: {
      HeaderCard,CenterCard,BottomCard
    },
    data() {
      return {
        saleChartOption:{},
        recChartOption:{},
        where: {
          dateEnum:'2',
          sDate : moment().startOf('months').format('YYYY-MM-DD 00:00:00'),
          eDate : moment().endOf('months').format('YYYY-MM-DD 23:59:59')
        },
      }
    },
    created(){
      
      //初始化signalr
      // this.signalR.initSignalR();
      // setTimeout(() => {
      //   this.$nextTick(()=>{
      //     document.querySelector(".el-loading-mask").style.display = 'none';
      //   })
      // }, 1000);
    },
    mounted(){
      
    },
    methods:{
      reload(){
        
        // this.$refs.header.reload();
        // this.$refs.centercard.reload();
        // this.$refs.bottomcard.reload();
      },

      reloadHome(notification){
        this.reload();
      },
     
    },
  };
</script>